package Solutions

func isPalindrome(s string) bool {
	for l, r := 0, len(s)-1; l < r; {
		if !((s[l] >= 'A' && s[l] <= 'Z') || (s[l] >= 'a' && s[l] <= 'z') || (s[l] >= '0' && s[l] <= '9')) {
			l++
			continue
		}
		if !((s[r] >= 'A' && s[r] <= 'Z') || (s[r] >= 'a' && s[r] <= 'z') || (s[r] >= '0' && s[r] <= '9')) {
			r--
			continue
		}
        // fmt.Println(s[l],s[r])
		if s[l] == s[r] || (s[l]-s[r] == 'a'-'A'&&s[r]>='A') || (s[r]-s[l] == 'a'-'A'&&s[l]>='A') {
			l++
			r--

		} else {
			return false
		}
	}
	return true
}
